<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='template' %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<style type="text/css">
.news_block
        {
            border: medium dotted #a0c8fe; 
            height: auto;     
            width:auto; 
            padding:10px; 
            margin:10px; 
            text-align: justify;
        }
        .news_header
        {
            margin-bottom: 10px; 
            font-size: xx-large; 
            font-weight: bold; 
            font-style: normal; 
            font-family: Arial, Helvetica, sans-serif; 
            color: #02214b;
        }
        .news_inf
        {
            font-family: Arial, Helvetica, sans-serif; 
            font-size: small; 
            margin-bottom: 5px;
            color: #666666;
        }
        .cats_inf
        {
            font-family: Arial, Helvetica, sans-serif; 
            font-size: small; 
            margin-bottom: 5px;
            color: #0099FF;
        }
        .news_icon
        {
            height: auto; 
            width: auto; 
            float: left; 
            margin-right: 10px; 
            margin-bottom: 10px; 
            max-height:150px; 
            max-width:150px;
        }
        .cats_data
        {
            color: #333399
        }
</style>
</head>
<div>
<template:cat_items/>
</div><script type="text/javascript">
    $(document).ready(function () {
        $("#error").html("");
    });
    function SubmitBuy(gourl) {
    		$("#error").html("");   	 
		 	$.ajax({
            url: gourl,
            success: OnSuccessSBuy,
            error: OnErrorSBuy
        	});
    }
    function OnSuccessSBuy(resp) {
    	if (resp=="success")
    	{
    		$("#error").html("<div class=\"error_wdw\" style=\"color: #008800\">Предмет добавлен!</div>");
			setTimeout("hide_error();", 3000);
    		}
    	else
    		OnErrorSBuy(resp);
    }
    function OnErrorSBuy(resp) {    
	$("#error").html("<div class=\"error_wdw\">Не удалось добавить предмет в корзину!</div>");
	setTimeout("hide_error();", 3000);
    }
    
function DeleteGame(id)
{
	var gourl="/del_game?id="+id;
	$.ajax({
        url: gourl
    	});
	setTimeout("window.location.reload();", 1000);	
}
    </script>
</html>